#include "homechatform.h"
#include "ui_homechatform.h"

HomeChatForm::HomeChatForm(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::HomeChatForm)
{
    ui->setupUi(this);
}

HomeChatForm::~HomeChatForm()
{
    delete ui;
}

void HomeChatForm::on_pb_send_clicked()
{
    emit signalHomeChat(ui->msgTxtEdit->toPlainText());
}

void HomeChatForm::slotAppengChatMsg(QString name, QString role, QString msg)
{
    QString info = QString("<b>%1[%2]</b> : %3").arg(name).arg(role).arg(msg);
    ui->msgBrowser->append(info);
}
